package com.tutorialspoint;

import java.util.logging.Logger;

import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;

/**
 * <p>
 * <b>Overview:</b>
 * <p>
 * 
 * 
 * <pre>
 * Creation date: Feb 16, 2015
 * @author Amit Kshirsagar
 * @version 1.0
 * @since
 * 
 * <p><b>Modification History:</b><p>
 * 
 * 
 * </pre>
 */

public class JasperReportCompile {
	static Logger log = Logger.getLogger(JasperReportCompile.class.getName());

	public static void main(String[] args) {
		String sourceFileName = "./test/jasper_report_template.jrxml";

		System.out.println("Compiling Report Design ...");
		try {
			/**
			 * Compile the report to a file name same as the JRXML file name
			 */
			JasperCompileManager.compileReportToFile(sourceFileName);
		} catch (JRException e) {
			e.printStackTrace();
		}
		System.out.println("Done compiling!!! ...");
	}
}